package com.webas.api.dao;

import java.util.List;

import com.webas.api.entity.Entity;


public interface GenericDao<K extends Entity<?>> {

	K read(Object id);
	
	Object save(K entity);

	void delete(K entity);

	boolean isLazyLoaded(Object entity, String propertyName);

	K newEntityInstance();

	Class<K> type();

	//List<?> query(QueryConstraints queryConstraints);

	void flush();

	void commit();

	void rollback();

	void transaction();

	DaoSource getDaoSource();

	K refresh(K entity);
}
